package com.example.a2032.db.dao;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.example.a2032.entity.TempData;

import java.util.List;

@Dao
public interface TempDataDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(TempData sleepData);

    @Query("select * from tempdata")
    LiveData<List<TempData>> loadAllTempData();

    @Query("select * from tempdata where time between :startTime and :endTime")
    LiveData<List<TempData>> loadTempData(String startTime, String endTime);
}
